<?php

use yii\db\Migration;

/**
 * Handles the creation of table `generalocr_pdf`.
 */
class m180322_031723_create_generalocr_pdf_table extends Migration
{
    /**
     * {@inheritdoc}
     */
    public function safeUp()
    {
        $this->createTable('generalocr_pdf', [
            'id' => $this->primaryKey(),
            'title' => $this->string()->notNull()->comment('案卷名称'),
            'filename' => $this->string()->notNull()->comment('文件名'),
            'path' => $this->string()->notNull()->comment('文件路径'),
            'user_id' => $this->integer()->notNull()->comment('上传人'),
            'created_at' => $this->timestamp()->notNull()->comment('上传时间'),
        ]);
    }

    /**
     * {@inheritdoc}
     */
    public function safeDown()
    {
        $this->dropTable('generalocr_pdf');
    }
}
